<extend name="Public/base"/>

<block name="style">
	<link rel="stylesheet" href="__STATIC__/plugins/data-tables/DT_bootstrap.css" />
</block>

<block name="body">
    
    <div class="row">
        <div class="col-md-12">
            <!-- BEGIN EXAMPLE TABLE PORTLET-->
            <div class="portlet box green">
                <div class="portlet-title">
                    <div class="caption"><i class="fa fa-globe"></i>行为日志</div>
                    <div class="tools">
                        <a href="javascript:;" class="collapse"></a>
                        <a href="#portlet-config" data-toggle="modal" class="config"></a>
                        <a href="javascript:;" class="reload"></a>
                    </div>
                </div>
                <div class="portlet-body">
                    <div class="table-toolbar">
                        <div class="btn-group">
                            <button class="btn green ajax-get confirm" url="{:U('clear')}">清 空</button>
                            <button class="btn green ajax-post confirm" target-form="ids" url="{:U('remove')}">删 除</button>
                        </div>
                    </div>
                    <table class="table table-striped table-bordered table-hover" id="sample">
                        <thead>
                            <tr>
                                <th class="table-checkbox"><input type="checkbox" class="group-checkable" data-set="#sample .checkboxes" /></th>
                                <th>编号</th>
                                <th>行为名称</th>
                                <th>执行者</th>
                                <th>执行IP</th>
                                <th>执行时间</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            
                            <volist name="_list" id="vo">
                            <tr class="odd gradeX">
                                <td><input class="checkboxes ids" type="checkbox" name="ids[]" value="{$vo.id}" /></td>
                                <td>{$vo.id} </td>
                                <td>{:get_action($vo['action_id'],'title')}</td>
                                <td>{:get_nickname($vo['user_id'])}</td>
                                <td>{:long2ip($vo['action_ip'])}</td>
                                <td><span>{$vo.create_time|time_format}</span></td>
                                <td><a href="{:U('Action/edit?id='.$vo['id'])}">详细</a>
                                    <a class="confirm ajax-get" href="{:U('Action/remove?ids='.$vo['id'])}">删除</a>
                                    </td>
                            </tr>
                            </volist>
                        </tbody>
                    </table>
                    
                    <!-- 分页 -->
                    <div class="page">{$_page}</div>
                    <!-- /分页 -->

                </div>
            </div>
            <!-- END EXAMPLE TABLE PORTLET-->
        </div>
    </div>
</block>

<block name="script">
	<!-- BEGIN PAGE LEVEL PLUGINS -->
	<script type="text/javascript" src="__STATIC__/plugins/data-tables/jquery.dataTables.js"></script>
	<script type="text/javascript" src="__STATIC__/plugins/data-tables/DT_bootstrap.js"></script>
	<!-- END PAGE LEVEL PLUGINS -->
	<!-- BEGIN PAGE LEVEL SCRIPTS -->
	<script src="__STATIC__/scripts/app.js"></script>
	<script src="__STATIC__/scripts/table-managed.js"></script>     
	<script>
		jQuery(document).ready(function() {       
		   App.init();
		   TableManaged.init();
		});
	</script>
</block>
